﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;

public class UIFailed : MonoBehaviour
{
    public GameObject top;
    public GameObject buttonRestart, buttonContinue;

    private void Awake()
    {
        top = transform.Find("BG").gameObject;
        UGUIEventListener.Get(buttonRestart).onClick = (obj) =>
        {
            StepController.instance.RestartGame();
        };
        UGUIEventListener.Get(buttonContinue).onClick = (obj) =>
        {
            StepController.instance.RestartGame();
        };
    }
    
    private void Start()
    {
        HideAll();
    }

    public void Open()
    {
        //top.GetComponent<TweenPosition>().enabled = true;
        //top.GetComponent<TweenPosition>().PlayForward();
    }

    void HideAll()
    {
        //top.GetComponent<TweenPosition>().ResetToBeginning();
    }
}